<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
  <meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
	<meta http-equiv="Cache-Control" content="no-cache" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Expires" content="-1" />
  <title>Multitiendas Corona</title>
  <link href="css/estilos.css" rel="stylesheet" type="text/css" />
  <script type="text/javascript" src="js/generales.js"></script>
  <script type="text/javascript" src="js/validacion.js"></script>
  <script language="javascript" type="text/javascript">
    window.onload = function () {
      var txtUsername = document.getElementById("txtUsername");
      var txtPassword = document.getElementById("txtPassword");

      if (IsValid_Empty(txtUsername)) {
        txtUsername.focus();
      }
      else {
        txtPassword.focus();
      }
    };

    //-----------------------------------
    function validarFormulario() {
      var msgError = "";
      var txtUsername = document.getElementById("txtUsername");
      var txtPassword = document.getElementById("txtPassword");

      if (IsValid_Empty(txtUsername)) {
        msgError += " - Debe ingresar el Usuario\n";
        formatearEstiloConError(txtUsername, "");
      }
      else {
        if (!IsValid_CaracteresPermitidos(txtUsername)) {
          msgError += " - El texto ingresado en Usuario no puede contener los siguientes caracteres: " + CARACTERES_NO_VALIDOS_SIN_SEPARADOR + "\n";
          formatearEstiloConError(txtUsername, "");
        }
        else {
          formatearEstiloNormal(txtUsername, "", false, false, "", "");
        }
      }

      if (IsValid_Empty(txtPassword)) {
        msgError += " - Debe ingresar la Contraseña\n";
        formatearEstiloConError(txtPassword, "");
      }
      else {
        if (!IsValid_CaracteresPermitidos(txtPassword)) {
          msgError += " - El texto ingresado en Contraseña no puede contener los siguientes caracteres: " + CARACTERES_NO_VALIDOS_SIN_SEPARADOR + "\n";
        }
        else {
          formatearEstiloNormal(txtPassword, "", false, false, "", "");
        }
      }

      if (msgError != "") {
        alert("Se encontraron los siguientes errores:\n" + msgError);
        return false;
      }
      else {
        return true;
      }
    }
  </script>
</head>
<body style="background-color:#f0f0f0;">

  <s:form action="login" method="post">
    <center>
      <div class="clearBoth" style="padding-top:100px;">
        <div class="clearBoth" style="margin-left:150px; margin-right:150px;">
          <div class="clearBoth"></div>
          <div class="clearBoth" style="width:430px;">
            <!-- Tabla con marco -->
            <s:actionerror/>
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
              <tr>
                <td valign="top" style="width:10px;background-image:url(img/marcoForm/card_tl_new.gif); background-position:top left; background-repeat:no-repeat;"><img src="img/_blank.gif" width="1px" height="1px" alt="" /></td>
                <td valign="top" style="background-image:url(img/marcoForm/card_top_new.gif); background-position:top; background-repeat:repeat-x;padding-left:7px;padding-top:10px;"><img src="img/_blank.gif" width="1px" height="1px" alt="" /></td>
                <td valign="top" style="width:10px;background-image:url(img/marcoForm/card_tr_new.gif); background-position:top right; background-repeat:no-repeat;"><img src="img/_blank.gif" width="1px" height="1px" alt="" /></td>
              </tr>
              <tr>
                <td valign="top" style="background-image:url(img/marcoForm/card_left_new.gif); background-position:left; background-repeat:repeat-y;"><img src="img/_blank.gif" width="1px" height="1px" alt="" /></td>
                <td valign="top" style="padding-left:7px;padding-top:15px;background-color:#FFFFFF;">
                  <!-- Contenido Interno del marco -->
                <table border ="0">

	                <tr>
		                <td class="cssTituloLogin" colspan="2" height="30px"><b>Ingreso al Sistema de Evaluacion del DESEMPE&Ntilde;O</b><br /></td>
	                </tr>

	                <tr>
  	                <td class="floatLeftLogin cssLabelLogin" style="width:70px; height:25px; text-align:left">Usuario</td>
  	                <td><s:textfield name="usuario.userName" cssClass="cssInputLogin"/></td>
                   </tr>
                   <tr>
	 	                <td class="floatLeftLogin cssLabelLogin" style="width:70px; height:25px; text-align:left">Contraseña</td>
	                   <td>
                      <label>
						<s:password name="usuario.password" cssClass="cssInputLogin"/>
	   	              </label>
	                   </td>
	                  </tr>
	                  <tr>
	                      <td>&nbsp;</td>
	                      <td><input type="submit" value="Ingresar"  onClick="validarFormulario()"/></td>
	                  </tr>
	                </table>

                  <!-- Fin Contenido Interno del marco -->
          </td>
                <td valign="top" style="background-image:url(img/marcoForm/card_right_new.gif); background-position:right; background-repeat:repeat-y;"><img src="img/_blank.gif" width="1px" height="1px" alt="" /></td>
              </tr>
              <tr style="height:31px">
                <td valign="top" style="background-image:url(img/marcoForm/card_bl_new.gif); background-position:bottom left; background-repeat:no-repeat;"><img src="img/_blank.gif" width="1px" height="1px" alt="" /></td>
                <td valign="top" style="background-image:url(img/marcoForm/card_bot_new.gif); background-position:bottom; background-repeat:repeat-x;">
                  
                </td>
                <td valign="top" style="background-image:url(img/marcoForm/card_br_new.gif); background-position:bottom right; background-repeat:no-repeat;"><img src="img/_blank.gif" width="1px" height="1px" alt="" /></td>
        </tr>
      </table>
            <!-- Fin Tabla con marco -->
          </div>
          <div style="display:none; width:100px;text-align:center; vertical-align:top;" class="cssLabelTip"></div>
        </div>
      </div>
    </center>

  </s:form>
</body>
</html>
